diff options
| author | secondl1ght <[email protected]> | 2022-08-22 18:00:00 -0400 |
|---|---|---|
| committer | secondl1ght <[email protected]> | 2022-08-22 18:00:00 -0400 |
| commit | 2aa7156e12200798c45a53878dbcc37c77625752 (patch) | |
| tree | 85d0cb70ec847bb7df8ca08ee5f5328ebc2600f4 /src/routes/invoice/[id] | |
| parent | bc77cf10532a4060d97b0f804111b4f582151120 (diff) | |
| download | coinos-ui-2aa7156e12200798c45a53878dbcc37c77625752.tar.gz coinos-ui-2aa7156e12200798c45a53878dbcc37c77625752.zip | |
finish hooking up currency selection
Diffstat (limited to 'src/routes/invoice/[id]')
| -rw-r--r-- | src/routes/invoice/[id]/+page.svelte | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/routes/invoice/[id]/+page.svelte b/src/routes/invoice/[id]/+page.svelte index d7824710..f42aba04 100644 --- a/src/routes/invoice/[id]/+page.svelte +++ b/src/routes/invoice/[id]/+page.svelte @@ -1,7 +1,7 @@ <script> import { get, post, reverseFormat } from '$lib/utils'; import { browser } from '$app/env'; - import { invoices, user, preferredCurrency } from '$lib/store'; + import { invoices, user } from '$lib/store'; import { Icon, Image } from '$comp'; import { goto } from '$app/navigation'; import { onMount } from 'svelte'; @@ -26,7 +26,7 @@ $: tipAmountFormatted = new Intl.NumberFormat('en-US', { style: 'currency', - currency: 'USD' + currency: $user.currency }).format(tipAmount); $: tipAmountSats = new Intl.NumberFormat('en-US', { maximumFractionDigits: 0 }).format( @@ -50,7 +50,7 @@ $: totalAmountFormatted = new Intl.NumberFormat('en-US', { style: 'currency', - currency: 'USD' + currency: $user.currency }).format(amountFiat + parseFloat(tipAmount)); const amountFormatted = new Intl.NumberFormat('en-US', { @@ -59,7 +59,7 @@ $: invoiceAmountFiatFormatted = new Intl.NumberFormat('en-US', { style: 'currency', - currency: 'USD' + currency: $user.currency }).format(amountFiat); let customTipAmount; @@ -296,7 +296,6 @@ <h1 class="text-3xl md:text-4xl font-bold mb-6">{$_('invoice.paymentSuccessful')}</h1> <h2 class="text-2xl md:text-3xl font-semibold"> {totalAmountFormatted} - {$preferredCurrency} </h2> <h3 class="text-secondary md:text-lg mb-6 mt-1">({totalAmountSats} SAT)</h3> <button class="bg-black text-white rounded-2xl w-20 py-3 font-bold" on:click={handleDoneClick}> |
